<?php
/*
 * Created on 24.03.2009 by MasterGenny
 *
 */
include_once('../dataAccess/classes/Team.php5');
include_once('../dataAccess/dao/TeamDAO.php5');
 
$vo = new TeamVO(0, "", "", "", "", 1455008, 0);
$vo->name = "Damen";
$vo->liga = "od";
$vo->klasse = "damen";
$vo->foto = "test.jpg";
$vo->verein = 145500;
$vo->saison = 2010;
$vo->suffix = "";

$dao = new TeamDAO();
//$dao->create($vo);
//$dao->update($vo);
//$dao->delete($vo);
//
//$cnt = count($list);
//$dao->delete($list[$cnt-1]);
//
$list = $dao->findAll();
echo count($list)."<bR>";
foreach ($list as $vo){
	$vo->show();
}

$vo2 = $dao->findByKlasse($vo->klasse);
echo count($vo2)."<br>";

$vo3 = $dao->findBySaison(2009);
$team = $dao->findById(1);
$team->saison = 2009;
$dao->update($team);
//$sponsor = $list[0];
//$sponsor->name=date("d.m.Y");  
//$sponsor->tel=date("d.m.Y");  
//$sponsor->fax=date("d.m.Y");  
//
//$dao->update($sponsor);
//$sp = $dao->findById($sponsor->id);
//$sp->show();
?>
